Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: change isDepositMode to getTransferMode #2031

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

fionnachan
Copy link
Member

Closes FS-929

@cla-bot cla-bot bot added the cla-signed label Oct 28, 2024
Copy link

vercel bot commented Oct 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
arbitrum-token-bridge ✅ Ready (Inspect) Visit Preview Dec 24, 2024 3:25pm

@fionnachan fionnachan marked this pull request as draft October 28, 2024 17:07
it('should return true for L2 source chain and L3 destination chain', () => {
const result1 = isDepositMode({
sourceChainId: ChainId.ArbitrumOne,
destinationChainId: 660279 // Xai
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this PR, but it would be nice to have enum for chain ids somewhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we can generate enums from the orbit chains data json, but i think the original idea was to only keep core chain's ids as enum

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this test at least, we could move the definition of the chain ids to the outer scope so we don't need to add comments every time.

chrstph-dvx
chrstph-dvx previously approved these changes Dec 13, 2024
douglance
douglance previously approved these changes Dec 13, 2024
@spsjvc spsjvc self-requested a review December 18, 2024 16:33
Copy link
Member

@spsjvc spsjvc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused that isDepositMode returns true for teleports, so I think we should talk first about what we consider deposits and figure out cleanups

@spsjvc spsjvc marked this pull request as draft December 23, 2024 11:10
@fionnachan fionnachan dismissed stale reviews from douglance and chrstph-dvx via b2c7fb4 December 24, 2024 15:16
@fionnachan fionnachan changed the title test: add tests for isDepositMode test: refactor isDepositMode to getTransferMode Dec 24, 2024
@fionnachan fionnachan changed the title test: refactor isDepositMode to getTransferMode refactor: change isDepositMode to getTransferMode Dec 24, 2024
@fionnachan fionnachan marked this pull request as ready for review December 24, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants